package jkim.plugin.daframe.ext.sql.views.actions;

import org.eclipse.jface.action.Action;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;


public class DaframeSQLLoggerKeyListener implements KeyListener {

	private Action copyLogAction;
	public DaframeSQLLoggerKeyListener(Action logInfoAction) {
		super();
		this.copyLogAction = logInfoAction;
	}

	public void keyPressed(KeyEvent e) {
		// do nothing.
	}

	public void keyReleased(KeyEvent e) {
		if (e.stateMask == SWT.CTRL && e.keyCode == 'c') {
			this.copyLogAction.run();
		}
	}

}
